﻿using ShowMsgModule.Views;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;

namespace ShowMsgModule
{
    public class ShowMsgModule : IModule
    {
        public void OnInitialized(IContainerProvider containerProvider)
        {
            var regionManager = containerProvider.Resolve<IRegionManager>();

            // 显示为UCMainData界面中的ShowMsgRegion界面
            //regionManager.RegisterViewWithRegion("ShowMsgRegion", typeof(ShowMsg));

            // 显示为MainWindow界面中的ContentRegion界面
            regionManager.RegisterViewWithRegion("ContentRegion", typeof(ShowMsg));

            //导航默认为NavA
            //regionManager.RegisterViewWithRegion("NavigationRegion", typeof(NavA)); 
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<NavA>();
            containerRegistry.RegisterForNavigation<NavB>();
            containerRegistry.RegisterForNavigation<NavC>();
           
        }
    }
}